package com.example.carproviderdriver.service.impl.lwj;

import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.dubbo.config.annotation.Service;
import com.example.carinterface.pojo.BusinessOrder;
import com.example.carinterface.pojo.Driver;
import com.example.carinterface.pojo.DriverComment;
import com.example.carinterface.service.lwj.RevisePwdService;
import com.example.carinterface.utils.ResultJson;
import com.example.carproviderdriver.mapper.lwj.RevisePwdMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: zdk
 * Date: 2020/09/29 21:46
 * Description:
 * Version: V1.0
 */
@Service
public class RevisePwdServiceImpl implements RevisePwdService {

//    @Reference(check = false)
//    RevisePwdMapper revisePwdMapper;

    @Autowired
RevisePwdMapper revisePwdMapper;

//验证手机修改密码
    @Override
    public int querytm(@Param("tel") String tel ,@Param("password") String password) {
        System.out.println("sssss"+tel+"=="+password);
        return revisePwdMapper.checkqt(tel,password);
    }
//修改密码
    @Override
    public int revisePwd(Driver driver) {
        System.out.println("ssssssvvv");
        System.out.println(driver.getTel()+"==ssss=="+driver.getPassword());
        return revisePwdMapper.revisePwd(driver);
    }

    @Override
    public List<DriverComment> queryComment(@Param("id")Integer id) {
        System.out.println( id+"========");
        return revisePwdMapper.queryComment(id);
    }

    @Override
    public List<BusinessOrder> querySal(int driver_id) {
        System.out.println("sal====="+driver_id);
        return revisePwdMapper.querySal(driver_id);
    }

    @Override
    public List<Map> queryOrder(int id) {
        return revisePwdMapper.queryOrder(id);
    }

    @Override
    public Map<String, Object> queryData(Integer id) {


        return revisePwdMapper.queryData(id);
    }

    @Override
    public Boolean receivingOder(int businessOrder_id) {
        return revisePwdMapper.receivingOder(businessOrder_id);
    }

    @Override
    public Boolean receivingOdera(int businessOrder_id) {
        return revisePwdMapper.receivingOdera(businessOrder_id);
    }

    @Override
    public Boolean receivingOderb(int businessOrder_id) {
        return revisePwdMapper.receivingOderb(businessOrder_id);
    }

    @Override
    public Boolean receivingOderc(int businessOrder_id) {
        return revisePwdMapper.receivingOderc(businessOrder_id);
    }

    @Override
    public Boolean receivingOderd(int businessOrder_id) {
        return revisePwdMapper.receivingOderd(businessOrder_id);
    }

    @Override
    public Boolean receivingOdere(int businessOrder_id) {
        return revisePwdMapper.receivingOdere(businessOrder_id);
    }

    @Override
    public Boolean receivingOderf(int businessOrder_id) {
        return revisePwdMapper.receivingOderf(businessOrder_id);
    }

    @Override
    public Boolean receivingOderg(int businessOrder_id) {
        return revisePwdMapper.receivingOderg(businessOrder_id);
    }

    @Override
    public Boolean mapLode(int id) {
        return revisePwdMapper.mapLode(id);
    }

    @Override
    public Boolean sucOder(int id) {
        return revisePwdMapper.sucOder(id);
    }

    @Override
    public ResultJson jiedan(Map<String, Integer> map) {
        ResultJson resultJson=new ResultJson();
        if(revisePwdMapper.insertState(map)>0){
            return resultJson.setSuccess("接单成功");
        }
        return resultJson.setFail("接车失败");
    }
    //
}
